home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
database
/
sac.zip
/
INSTALL.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-06-20
|
8KB
|
276 lines
echo off
rem Batch file: Install.bat 01.03.01
rem Programmer: D. Allen
rem Created: 04/18/93
rem Updated: 06/20/94
rem Copyright (c) 1993
cls
kls 1
echo.
echo Installing Foxpro application...
echo.
echo.
echo At each prompt, press [Enter] for the default, [Esc] to abort...
if exist input.exe goto step1
echo.
echo.
echo Please log onto the drive containing the installation disk
echo before running the INSTALL program.
goto quit
:step1
set tmp=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
if not %tmp%.==. goto step2
echo.
echo.
echo Out of environment space. Please add the following to your CONFIG.SYS
echo.
echo SHELL=C:\DOS\COMMAND.COM C:\DOS\ /E:1024 /p
echo.
echo Note: If you already have /E:1024, then use /E:2048.
goto quit
:step2
set prg=c:\sky\sac
echo.
echo.
input " Please enter the Foxpro application directory: " /mprg /f180 /q 23 31
if errorlevel 254 goto quit
if %prg%.==. goto quit
bd %prg%\bak
set tmp=
if not exist %prg% copy read.me %prg%\read.me > nul
if not exist %prg%\read.me set tmp=not
for %%f in (%prg%\*.com) do set tmp=com
for %%f in (%prg%\*.sys) do set tmp=sys
if %tmp%.==. goto step3
echo.
echo.
echo Error: Cannot install on directory %prg%\
if exist %prg% echo (%prg% exists as a file)
if %tmp%.==com. echo (%prg% has a COM file)
if %tmp%.==sys. echo (%prg% has a SYS file)
goto step2
:step3
set run=c:\foxrun
echo.
echo.
input " Please enter the Foxpro or Foxpro runtime directory: " /mrun /f180 /q 23 31
if errorlevel 254 goto quit
set runr=%run%\foxr
if exist %run%\foxr.exe goto step4
set runr=%run%\foxrw
if exist %run%\foxrw.exe goto step4
set runr=%run%\fox
if exist %run%\fox.exe goto step4
set runr=%run%\foxpro
if exist %run%\foxpro.exe goto step4
set runr=%run%\foxprox
if exist %run%\foxprox.exe goto step4
set runr=%run%\foxprow
if exist %run%\foxprow.exe goto step4
echo.
echo.
echo Error: Foxpro does not exist on directory %run%\
goto step3
:step4
echo.
echo.
input " Do you want to install as a multi-user application? " /q 23 31 /n+ /mmult
if errorlevel 254 goto quit
echo.
echo.
input " Do you want to install as a system administrator? " /q 23 31 /n+ /minit
if errorlevel 254 goto quit
echo.
echo.
input " Do you want to save Browse command preferences? " /q 23 31 /n+ /mlast
if errorlevel 254 goto quit
echo.
echo.
input " Do you want to recall deleted records? " /q 23 31 /n+ /mrecall
if errorlevel 254 goto quit
echo.
echo.
input " Do you want the system menu displayed? (Foxpro for DOS) " /q 23 31 /n+ /msysm
if errorlevel 254 goto quit
echo.
echo.
echo Installation proceeding. Please wait...
for %%f in (%prg%\bak\*.*) do del %%f
for %%f in (%prg%\scr.*) do del %%f
for %%f in (%prg%\*.cdx) do copy %%f %prg%\bak > nul
for %%f in (%prg%\*.dbf) do copy %%f %prg%\bak > nul
for %%f in (%prg%\*.fpt) do copy %%f %prg%\bak > nul
for %%f in (%prg%\*.mem) do copy %%f %prg%\bak > nul
for %%f in (%prg%\config.fp?) do copy %%f %prg%\bak > nul
if exist %prg%\foxpro.ini copy %prg%\foxpro.ini %prg%\bak > nul
if exist %prg%\sac.bat copy %prg%\sac.bat %prg%\bak > nul
for %%f in (%prg%\*.plb) do attrib -r %%f > nul
for %%f in (%prg%\*.tmp) do del %%f
copy xd.exe %prg% > nul
copy register.doc %prg% > nul
copy read.me %prg% > nul
copy file_id.diz %prg% > nul
pkunzip -d -o foxpro *.* %prg%
for %%f in (%prg%\*.plb) do attrib +r %%f > nul
for %%f in (%prg%\bak\*.*) do copy %%f %prg% > nul
if %mult%.==NO. goto user2
:user1
set drv=%run%\user1
cls
kls 1
echo.
echo Installing resource directories...
echo.
echo This is a multi-user application. Each user or workstation needs a
echo unique resource directory. When prompted, type the desired resource
echo directory and press [Enter]. You will be prompted for any additional
echo directories. When finished, simply press [Enter] to continue, press
echo [Esc] to abort...
:user11
echo.
echo.
input " Please enter the next resource directory: " /mdrv /f180 /q 23 31
if errorlevel 254 goto quit
if %drv%.==. goto final
bd %drv%
if not exist %drv% copy read.me %drv%\read.me > nul
if exist %drv%\read.me goto user3
echo.
echo.
echo Error: Cannot install user on directory %drv%\
if exist %drv% echo (%drv% exists as a file)
set drv=
goto user11
:user2
set drv=%prg%
cls
kls 1
echo.
echo Installing startup directory...
echo.
echo This is a single-user application. You need to define your startup
echo directory. Also known as the user resource directory.
echo Press [Enter] for the default, [Esc] to abort...
:user21
echo.
echo.
input " Please enter startup directory: " /mdrv /f180 /q 23 31
if errorlevel 254 goto quit
if %drv%.==. goto final
bd %drv%
if not exist %drv% copy read.me %drv%\read.me > nul
if exist %drv%\read.me goto user3
echo.
echo.
echo Error: Cannot install startup directory %drv%\
if exist %drv% echo (%drv% exists as a file)
set drv=
goto user21
:user3
if not exist %drv%\foxuser.dbf copy %prg%\foxuser.* %drv% > nul
if exist %drv%\config.fp copy %drv%\config.fp %drv%\config.bak > nul
echo _FOXDOC = ''> %drv%\config.fp
echo _FOXGRAPH = ''>> %drv%\config.fp
echo _GENGRAPH = ''>> %drv%\config.fp
echo BELL = OFF>> %drv%\config.fp
echo DEVELOPMENT = OFF>> %drv%\config.fp
echo FILES = 45>> %drv%\config.fp
echo INDEX = NDX>> %drv%\config.fp
echo MVARSIZE = 20>> %drv%\config.fp
echo MVCOUNT = 512>> %drv%\config.fp
echo RESOURCE = %drv%\>> %drv%\config.fp
echo RESOURCE = ON>> %drv%\config.fp
echo SAFETY = OFF>> %drv%\config.fp
echo STATUS = OFF>> %drv%\config.fp
echo TALK = OFF>> %drv%\config.fp
if exist %drv%\foxpro.ini copy %drv%\foxpro.ini %drv%\foxpro.bak > nul
echo [GetEnv]> %drv%\foxpro.ini
if %init%.==YES. echo init=yes>> %drv%\foxpro.ini
if %last%.==YES. echo last=yes>> %drv%\foxpro.ini
if %mult%.==YES. echo mult=yes>> %drv%\foxpro.ini
if %recall%.==YES. echo recall=yes>> %drv%\foxpro.ini
if %sysm%.==YES. echo sysmenu=show>> %drv%\foxpro.ini
if exist %drv%\sac.bat copy %drv%\sac.bat %drv%\sac.bak > nul
echo echo off> %drv%\sac.bat
if not %prg%.==%drv%. echo %prg%\xd %prg%\ /!>> %drv%\sac.bat
echo %runr% -t -c%drv%\config.fp -m3500 sac>> %drv%\sac.bat
if not %prg%.==%drv%. echo %prg%\xd %drv%\ /!>> %drv%\sac.bat
echo cls>> %drv%\sac.bat
echo echo.>> %drv%\sac.bat
if not exist %prg%\sac.prg echo echo %prg% application (shareware version)>> %drv%\sac.bat
if exist %prg%\sac.prg echo echo %prg% application (registered version)>> %drv%\sac.bat
echo echo (c) 1993 Dennis Allen>> %drv%\sac.bat
echo echo All rights reserved>> %drv%\sac.bat
echo echo.>> %drv%\sac.bat
echo.
echo.
echo. Resource directory %drv% installed...
if %mult%.==YES. set drv=
if %mult%.==YES. goto user11
:final
see read.me
cls
kls 1
echo Installation complete.
echo.
if %mult%.==YES. set drv=resource_directory
echo To run your application, type "sac" from the %drv% prompt...
if exist %prg%\sac.man echo To print your manual, select option "M" of the system setup menu...
echo.
echo Copyright Notices:
echo.
echo Foxpro and MS-DOS are registered trademarks of Microsoft Corporation
echo.
echo PKUNZIP.EXE is a product of PkWare, Inc.
echo.
echo BD.COM is a product from Daniel A. Crone, Compu-Serve #73027,1435
echo.
echo INPUT.EXE, KLS.EXE and XD.EXE are part of the shareware
echo utility set from Steenburgh's STUFF, a product of Tay-Jee Software.
echo For more information, call (703) 464-5290.
echo.
echo SEE.EXE is a product of Pinnacle Software.
echo.
if not exist %prg%\sac.prg echo %prg% application (shareware version)
if exist %prg%\sac.prg echo %prg% application (registered version)
echo (c) 1993 Dennis Allen
echo All rights reserved
:quit
set drv=
set init=
set last=
set mult=
set prg=
set run=
set runr=
set recall=
set sysm=
set tmp=